registry:
  restart: always
  image: registry:latest
  ports:
    - 443:5000
  environment:
    REGISTRY_HTTP_TLS_CERTIFICATE: /certs/domain.crt
    REGISTRY_HTTP_TLS_KEY: /certs/domain.key
    REGISTRY_AUTH: htpasswd
    REGISTRY_AUTH_HTPASSWD_PATH: /var/lib/registry/passfile
    REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
    REGISTRY_STORAGE_DELETE_ENABLED: "true"
  volumes:
    - /etc/letsencrypt/live/{{ domain }}:/certs
    - /mnt/docker-registry:/var/lib/registry
